function startCourse()
{
	
	if( typeof sessionStorage === "undefined" || sessionStorage.disabled )
	{
		alert( "You must enable cookies for this course to work properly." );
	}
	else
	{
		
        if( !sessionStorage.getItem( "course_started" ) )
        {
        	
            sessionStorage.clear();
      		sessionStorage.setItem( "course_started", "1" );
    		sessionStorage.setItem( "Belgium", "0" );
    		sessionStorage.setItem( "Sudan", "0" );
    		sessionStorage.setItem( "UAE", "0" );
    		sessionStorage.setItem( "Bangladesh", "0" );
    		
        }
	}
}

function visitBelgium()
{
	sessionStorage.setItem( "Belgium", "visited" );
	showTest();
}

function visitSudan()
{
	sessionStorage.setItem( "Sudan", "visited" );
	showTest();
}

function visitUAE()
{
	sessionStorage.setItem( "UAE", "visited" );
	showTest();
}

function visitBangladesh()
{
	sessionStorage.setItem( "Bangladesh", "visited" );
	showTest();
}


function showTest()
{
	var BelgiumVisited = sessionStorage.getItem( "Belgium" );
	var SudanVisited = sessionStorage.getItem( "Sudan" );
	var UAEVisited = sessionStorage.getItem( "UAE" );
	var BangladeshVisited = sessionStorage.getItem( "Bangladesh" );
	
	if( BelgiumVisited == "visited" && SudanVisited == "visited" && UAEVisited == "visited" &&
		BangladeshVisited == "visited" )
	{
		document.getElementById( "test-link" ).style.display = "inline";
	}
	
}



function submitQuiz1()
{
	
	
	var numberCorrect = 0;
	
	var q1 = document.forms.quiz1.question1;

	if( q1[ 1 ].checked == true ) 
	{
		numberCorrect = numberCorrect + 1;
	}
	
	var q2 = document.forms.quiz1.question2;
	
	if( q2[ 2 ].checked == true )
	{
		numberCorrect = numberCorrect + 1;
	}

	var q3 = document.forms.quiz1.question3;
	
	if( q3[ 2 ].checked == true )
	{
		numberCorrect = numberCorrect + 1;
	}
	
	var q4 = document.forms.quiz1.question4;
	
	if( q4[ 2 ].checked == true )
	{
		numberCorrect = numberCorrect + 1;
	}

    var q5 = document.forms.quiz1.question5;
	
	if( q5[ 0 ].checked == true )
	{
		numberCorrect = numberCorrect + 1;
	}
	var q6 = document.forms.quiz1.question6;
	
	if( q6[ 1 ].checked == true )
	{
		numberCorrect = numberCorrect + 1;
	}
	var score = numberCorrect / 6 * 100;
	alert( "Your score is " + score );
	
}
